//编写函数，以读模式打开一个文件，将其内容读入到一个string的vector中，将每一行作为一个独立的元素存于vector中。
//#include<iostream>
//#include<fstream>
//#include<string>
//#include<vector>
//using namespace std;
//int main()
//{
//	fstream iso;
//	vector<string> i;
//	vector<string>::iterator k = i.begin();
//	string n;
//	iso.open("isotxt.txt",ios::app);
//	iso>>n;
//	*k++ = n;
//	cout << n;
//	iso.close();
//}
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
int main()
{
	ifstream in("isotxt.txt");
	if (!in){
		cerr << "Can't open the file"<<endl;
		return - 1;
	}
	string line;
	vector<string>words;
	while (getline(in, line))
	{
		words.push_back(line);
	}
	in.close();
	vector<string>::const_iterator it = words.begin();
	while (it != words.end()) {
		cout << *it << endl;
	}
	return 0;
}